#!/usr/bin/python

import os
import subprocess

# unzip src.tar.gz
subprocess.call('tar xvf src.tar.gz > /dev/null', shell=True)
os.chdir('src')

import sys
job = sys.argv[1]
args = ' '.join(sys.argv[2:])

if os.path.exists('/usr/bin/python26'):
    python = 'python26'
elif os.path.exists('/usr/bin/python2.6'):
    python = 'python2.6'
else:
    python = 'python'

subprocess.call('%s %s %s'%(python, job, args), shell=True)
